package com.presto.directo.mvvm.view

import android.os.Bundle
import android.view.View
import androidx.core.view.isVisible
import com.presto.directo.base.BaseActivity
import com.presto.directo.databinding.ActivityContactBinding
import com.presto.directo.entity.ConfigEntity

class ContactActivity : BaseActivity() {
    override val rootView: View
        get() = binding.root

    private val binding by lazy { ActivityContactBinding.inflate(layoutInflater) }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val config = intent.getSerializableExtra("config") as ConfigEntity?
        binding.tvPhone.isVisible = !config?.hot_tel.isNullOrBlank()
        binding.tvEmail.isVisible = !config?.email.isNullOrBlank()
        binding.tvPhone.text = config?.hot_tel
        binding.tvEmail.text = config?.email
    }

}